3.1.5 \(\int x^2 (a+b \csc ^{-1}(c x)) \, dx\) [5]

Optimal. Leaf size=64 \[ \frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2}{6 c}+\frac {1}{3} x^3 \left (a+b \csc ^{-1}(c x)\right )+\frac {b \tanh ^{-1}\left (\sqrt {1-\frac {1}{c^2 x^2}}\right )}{6 c^3} \]

[Out]

1/3*x^3*(a+b*arccsc(c*x))+1/6*b*arctanh((1-1/c^2/x^2)^(1/2))/c^3+1/6*b*x^2*(1-1/c^2/x^2)^(1/2)/c

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {5329, 272, 44, 65, 214} \begin {gather*} \frac {1}{3} x^3 \left (a+b \csc ^{-1}(c x)\right )+\frac {b x^2 \sqrt {1-\frac {1}{c^2 x^2}}}{6 c}+\frac {b \tanh ^{-1}\left (\sqrt {1-\frac {1}{c^2 x^2}}\right )}{6 c^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*ArcCsc[c*x]),x]

[Out]

(b*Sqrt[1 - 1/(c^2*x^2)]*x^2)/(6*c) + (x^3*(a + b*ArcCsc[c*x]))/3 + (b*ArcTanh[Sqrt[1 - 1/(c^2*x^2)]])/(6*c^3)

Rule 44

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n + 1
)/((b*c - a*d)*(m + 1))), x] - Dist[d*((m + n + 2)/((b*c - a*d)*(m + 1))), Int[(a + b*x)^(m + 1)*(c + d*x)^n,
x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, -1] &&  !IntegerQ[n] && LtQ[n, 0]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 5329

Int[((a_.) + ArcCsc[(c_.)*(x_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*ArcCsc[c*x]
)/(d*(m + 1))), x] + Dist[b*(d/(c*(m + 1))), Int[(d*x)^(m - 1)/Sqrt[1 - 1/(c^2*x^2)], x], x] /; FreeQ[{a, b, c
, d, m}, x] && NeQ[m, -1]

Rubi steps

\begin {align*} \int x^2 \left (a+b \csc ^{-1}(c x)\right ) \, dx &=\frac {1}{3} x^3 \left (a+b \csc ^{-1}(c x)\right )+\frac {b \int \frac {x}{\sqrt {1-\frac {1}{c^2 x^2}}} \, dx}{3 c}\\ &=\frac {1}{3} x^3 \left (a+b \csc ^{-1}(c x)\right )-\frac {b \text {Subst}\left (\int \frac {1}{x^2 \sqrt {1-\frac {x}{c^2}}} \, dx,x,\frac {1}{x^2}\right )}{6 c}\\ &=\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2}{6 c}+\frac {1}{3} x^3 \left (a+b \csc ^{-1}(c x)\right )-\frac {b \text {Subst}\left (\int \frac {1}{x \sqrt {1-\frac {x}{c^2}}} \, dx,x,\frac {1}{x^2}\right )}{12 c^3}\\ &=\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2}{6 c}+\frac {1}{3} x^3 \left (a+b \csc ^{-1}(c x)\right )+\frac {b \text {Subst}\left (\int \frac {1}{c^2-c^2 x^2} \, dx,x,\sqrt {1-\frac {1}{c^2 x^2}}\right )}{6 c}\\ &=\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2}{6 c}+\frac {1}{3} x^3 \left (a+b \csc ^{-1}(c x)\right )+\frac {b \tanh ^{-1}\left (\sqrt {1-\frac {1}{c^2 x^2}}\right )}{6 c^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 85, normalized size = 1.33 \begin {gather*} \frac {a x^3}{3}+\frac {b x^2 \sqrt {\frac {-1+c^2 x^2}{c^2 x^2}}}{6 c}+\frac {1}{3} b x^3 \csc ^{-1}(c x)+\frac {b \log \left (x \left (1+\sqrt {\frac {-1+c^2 x^2}{c^2 x^2}}\right )\right )}{6 c^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*ArcCsc[c*x]),x]

[Out]

(a*x^3)/3 + (b*x^2*Sqrt[(-1 + c^2*x^2)/(c^2*x^2)])/(6*c) + (b*x^3*ArcCsc[c*x])/3 + (b*Log[x*(1 + Sqrt[(-1 + c^
2*x^2)/(c^2*x^2)])])/(6*c^3)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(111\) vs. \(2(54)=108\).
time = 0.14, size = 112, normalized size = 1.75

method result size
derivativedivides \(\frac {\frac {c^{3} x^{3} a}{3}+\frac {b \,c^{3} x^{3} \mathrm {arccsc}\left (c x \right )}{3}+\frac {b \left (c^{2} x^{2}-1\right )}{6 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}+\frac {b \sqrt {c^{2} x^{2}-1}\, \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{6 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}}{c^{3}}\) \(112\)
default \(\frac {\frac {c^{3} x^{3} a}{3}+\frac {b \,c^{3} x^{3} \mathrm {arccsc}\left (c x \right )}{3}+\frac {b \left (c^{2} x^{2}-1\right )}{6 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}+\frac {b \sqrt {c^{2} x^{2}-1}\, \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{6 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}}{c^{3}}\) \(112\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arccsc(c*x)),x,method=_RETURNVERBOSE)

[Out]

1/c^3*(1/3*c^3*x^3*a+1/3*b*c^3*x^3*arccsc(c*x)+1/6*b*(c^2*x^2-1)/((c^2*x^2-1)/c^2/x^2)^(1/2)+1/6*b*(c^2*x^2-1)
^(1/2)/((c^2*x^2-1)/c^2/x^2)^(1/2)/c/x*ln(c*x+(c^2*x^2-1)^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 97, normalized size = 1.52 \begin {gather*} \frac {1}{3} \, a x^{3} + \frac {1}{12} \, {\left (4 \, x^{3} \operatorname {arccsc}\left (c x\right ) + \frac {\frac {2 \, \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{c^{2} {\left (\frac {1}{c^{2} x^{2}} - 1\right )} + c^{2}} + \frac {\log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}{c^{2}} - \frac {\log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} - 1\right )}{c^{2}}}{c}\right )} b \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arccsc(c*x)),x, algorithm="maxima")

[Out]

1/3*a*x^3 + 1/12*(4*x^3*arccsc(c*x) + (2*sqrt(-1/(c^2*x^2) + 1)/(c^2*(1/(c^2*x^2) - 1) + c^2) + log(sqrt(-1/(c
^2*x^2) + 1) + 1)/c^2 - log(sqrt(-1/(c^2*x^2) + 1) - 1)/c^2)/c)*b

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 94, normalized size = 1.47 \begin {gather*} \frac {2 \, a c^{3} x^{3} - 4 \, b c^{3} \arctan \left (-c x + \sqrt {c^{2} x^{2} - 1}\right ) + \sqrt {c^{2} x^{2} - 1} b c x + 2 \, {\left (b c^{3} x^{3} - b c^{3}\right )} \operatorname {arccsc}\left (c x\right ) - b \log \left (-c x + \sqrt {c^{2} x^{2} - 1}\right )}{6 \, c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arccsc(c*x)),x, algorithm="fricas")

[Out]

1/6*(2*a*c^3*x^3 - 4*b*c^3*arctan(-c*x + sqrt(c^2*x^2 - 1)) + sqrt(c^2*x^2 - 1)*b*c*x + 2*(b*c^3*x^3 - b*c^3)*
arccsc(c*x) - b*log(-c*x + sqrt(c^2*x^2 - 1)))/c^3

________________________________________________________________________________________

Sympy [A]
time = 2.64, size = 107, normalized size = 1.67 \begin {gather*} \frac {a x^{3}}{3} + \frac {b x^{3} \operatorname {acsc}{\left (c x \right )}}{3} + \frac {b \left (\begin {cases} \frac {x \sqrt {c^{2} x^{2} - 1}}{2 c} + \frac {\operatorname {acosh}{\left (c x \right )}}{2 c^{2}} & \text {for}\: \left |{c^{2} x^{2}}\right | > 1 \\- \frac {i c x^{3}}{2 \sqrt {- c^{2} x^{2} + 1}} + \frac {i x}{2 c \sqrt {- c^{2} x^{2} + 1}} - \frac {i \operatorname {asin}{\left (c x \right )}}{2 c^{2}} & \text {otherwise} \end {cases}\right )}{3 c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*acsc(c*x)),x)

[Out]

a*x**3/3 + b*x**3*acsc(c*x)/3 + b*Piecewise((x*sqrt(c**2*x**2 - 1)/(2*c) + acosh(c*x)/(2*c**2), Abs(c**2*x**2)
 > 1), (-I*c*x**3/(2*sqrt(-c**2*x**2 + 1)) + I*x/(2*c*sqrt(-c**2*x**2 + 1)) - I*asin(c*x)/(2*c**2), True))/(3*
c)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 310 vs. \(2 (54) = 108\).
time = 0.68, size = 310, normalized size = 4.84 \begin {gather*} \frac {1}{24} \, {\left (\frac {b x^{3} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{3} \arcsin \left (\frac {1}{c x}\right )}{c} + \frac {a x^{3} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{3}}{c} + \frac {b x^{2} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{2}}{c^{2}} + \frac {3 \, b x {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )} \arcsin \left (\frac {1}{c x}\right )}{c^{3}} + \frac {3 \, a x {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}}{c^{3}} + \frac {4 \, b \log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}{c^{4}} - \frac {4 \, b \log \left (\frac {1}{{\left | c \right |} {\left | x \right |}}\right )}{c^{4}} + \frac {3 \, b \arcsin \left (\frac {1}{c x}\right )}{c^{5} x {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}} + \frac {3 \, a}{c^{5} x {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}} - \frac {b}{c^{6} x^{2} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{2}} + \frac {b \arcsin \left (\frac {1}{c x}\right )}{c^{7} x^{3} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{3}} + \frac {a}{c^{7} x^{3} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{3}}\right )} c \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arccsc(c*x)),x, algorithm="giac")

[Out]

1/24*(b*x^3*(sqrt(-1/(c^2*x^2) + 1) + 1)^3*arcsin(1/(c*x))/c + a*x^3*(sqrt(-1/(c^2*x^2) + 1) + 1)^3/c + b*x^2*
(sqrt(-1/(c^2*x^2) + 1) + 1)^2/c^2 + 3*b*x*(sqrt(-1/(c^2*x^2) + 1) + 1)*arcsin(1/(c*x))/c^3 + 3*a*x*(sqrt(-1/(
c^2*x^2) + 1) + 1)/c^3 + 4*b*log(sqrt(-1/(c^2*x^2) + 1) + 1)/c^4 - 4*b*log(1/(abs(c)*abs(x)))/c^4 + 3*b*arcsin
(1/(c*x))/(c^5*x*(sqrt(-1/(c^2*x^2) + 1) + 1)) + 3*a/(c^5*x*(sqrt(-1/(c^2*x^2) + 1) + 1)) - b/(c^6*x^2*(sqrt(-
1/(c^2*x^2) + 1) + 1)^2) + b*arcsin(1/(c*x))/(c^7*x^3*(sqrt(-1/(c^2*x^2) + 1) + 1)^3) + a/(c^7*x^3*(sqrt(-1/(c
^2*x^2) + 1) + 1)^3))*c

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int x^2\,\left (a+b\,\mathrm {asin}\left (\frac {1}{c\,x}\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*asin(1/(c*x))),x)

[Out]

int(x^2*(a + b*asin(1/(c*x))), x)

________________________________________________________________________________________